<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>2D</title>
<script src="jquery-1.9.0.min.js"></script>
<link rel="stylesheet" href="main.css">
</head>
<body>
	<div  class="box">
		<ul>
			<li data-id=1>1</li>
			<li data-id=2>2</li>
			<li data-id=3>3</li>
			<li data-id=4>4</li>
			<li data-id=5>5</li>
			<li data-id=6>6</li>
		</ul>
	</div>
	<div class="log">
		
	</div>
</body>

<script src="rotateOne.js" ></script>

<script>
	
	$(function(){
		document.onkeydown = function(e) { 
			var code = e.keyCode - 37; 
			switch(code){ 
			case 1 : rotateOne("X",90);break;//上 
			case 2 : rotateOne("Y",90);break;//右 
			case 3 : rotateOne("X",-90);break;//下 
			case 0 : rotateOne("Y",-90);break;//左 
		} 
	}
})
</script>
</html>